/**
 * Created by Administrator on 2017/7/22.
 */
var OpenBrowserPlugin=require('open-browser-webpack-plugin');
var port=8088;
    module.exports={
    "devtool":"source-map",
    devServer:{
        port:port,
        inline:true,
    },
    entry:'./js/entry.js',
    output:{
        filename:'./bundle.js',
    },

    module:{
        loaders:[

            {
                test:/\.css$/,
                loader: 'style-loader!css-loader'

            },
            {
                test:/\.less$/,
                loader:'style-loader!css-loader!postcss-loader!less-loader'
            },
            {
                test:/\.(pnh|jpg|jpeg|svg|gif)$/,
                loader:'file-loader',
                query:{
                    name:'image/[name]-[hash:5].[ext]'
                }
            },
            {
                test:/\.js$/,
                loader:'babel-loader',
                exclude:/node_modules/,
                query:{
                    presets:['es2015']
                }
            }
        ]




    },
        plugins:[
            new OpenBrowserPlugin({url:'http://localhost:'+port})
        ]


}